package com.soft.javase.ch05.enums;

import java.util.Scanner;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/23
 *
 * 需求：要求完成用户在界面中的选择进行开档 WORD、PPT、EXCEL、XMIND
 */
public class WPSTest {
    public void choose(WPSType type){
        switch (type){
            case PPT:
                System.out.println("PPT开档");
                break;
            case WORD:
                System.out.println("WORD开档");
                break;
            case EXCEL:
                System.out.println("EXCEL开档");
                break;
            case XMIND:
                System.out.println("XMIND开档");
                break;
            default:
                System.out.println("有误");
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请选择要打开的文件类型：");
        System.out.println("1. WORD");
        System.out.println("2. PPT");
        System.out.println("3. EXCEL");
        System.out.println("4. XMIND");

        int choice = scanner.nextInt();

      WPSType wpsType = null;
        switch (choice) {
            case 1:
                wpsType = WPSType.WORD;
                break;
            case 2:
                wpsType = WPSType.PPT;
                break;
            case 3:
                wpsType = WPSType.EXCEL;
                break;
            case 4:
                wpsType = WPSType.XMIND;
                break;
            default:
                System.out.println("无效的选择，请输入 1 - 4 之间的数字。");
                return;
        }

    }
}
enum WPSType{

    WORD , PPT , EXCEL , XMIND

}
